# This code is part of the MWP System
# Copyright (c) 2012 Benjamin Lubin (blubin@bu.com) 
# Published under and subject to the GPLv2 license available at http://www.gnu.org/licenses/gpl-2.0.html

'''
Created on Dec 18, 2012
@author: blubin
'''

from frontend.roleApplication import RoleApplication;
from frontend.form import Type;

class EditorApplication(RoleApplication):
    """ The Editor User Interface """

    def __init__(self):
        super(EditorApplication, self).__init__("BookPublishing", "Editor");
        self.register_transition_step("editmanuscript", self.editor_form_creator, name_fields=["sequence", "AuthorFirstName", "AuthorLastName", "BookTitle"]);

    def editor_form_creator(self, stepname, form):
        form.add_task_label(fields=["AuthorFirstName", "AuthorLastName", "BookTitle"]);
        form.add_field(Type.LONGSTRING, "EditorNotes", labeltext="Editor Notes", initial="notes");
        form.add_field(Type.DATE, "Date");
        #form.add_field(Type.CHOICE, "EditorDecision", labeltext="Editor Decision", choices=['Pass', 'Fail'], initial='Pass');    
if __name__ == '__main__':
    app = EditorApplication();
    app.MainLoop();